Admin Operations

This guide covers administrative operations for the WTDVesting contract.

Roles

Role
Purpose

DEFAULT_ADMIN_ROLE

Set TGE, fund rounds, create team vesting, withdraw, lock vesting role

VESTING_ROLE

Create investor vesting schedules (granted to WTDSale contract)

Setup Workflow

1

Set TGE Timestamp

setTGE(timestamp)

Sets the Token Generation Event timestamp. This is required before any vesting schedules can be created.

  • Can only be called once — reverts with TGEAlreadySet() on subsequent calls

  • Timestamp must be in the future or current block time

  • All lock-up and vesting timelines are calculated relative to this date

Access: DEFAULT_ADMIN_ROLE

2

Fund Rounds

fundRound(round, amount)
  • round: 0 (Seed), 1 (Private), 2 (Public)

  • amount: WTD token amount to deposit (18 decimals)

Prerequisite: Caller must approve the vesting contract to transfer WTD tokens first.

Access: DEFAULT_ADMIN_ROLE

3

Fund Team & Advisors

fundTeamAdvisors(amount)

Deposits tokens for team/advisor vesting schedules.

Prerequisite: Caller must approve the vesting contract to transfer WTD tokens first.

Access: DEFAULT_ADMIN_ROLE

4

Grant VESTING_ROLE to Sale Contract

grantRole(VESTING_ROLE, WTDSale_address)

Grant VESTING_ROLE to the WTDSale contract address so it can create vesting schedules on purchases.

Access: DEFAULT_ADMIN_ROLE

5
lockVestingRole()

Permanently locks VESTING_ROLE so it can never be granted or revoked again. This ensures that only the WTDSale contract can create vesting schedules, and no future admin can change this.

circle-exclamation

Access: DEFAULT_ADMIN_ROLE

Creating Team Vesting

createTeamVesting(role, beneficiaries, totalAmount)
  • role: 0 (Founder), 1 (Early Employee), 2 (Advisor)

  • beneficiaries: Array of wallet addresses

  • totalAmount: Total WTD to distribute equally among all beneficiaries

The total amount is divided equally. For example, 3 beneficiaries with 3,000,000 WTD = 1,000,000 per person.

Prerequisite: TGE must be set. Team/advisor fund must have sufficient unallocated tokens.

Access: DEFAULT_ADMIN_ROLE

Withdrawing Unallocated Tokens

withdrawUnallocated(round, amount, to)

Withdraws tokens that were funded to a round but not yet allocated to any vesting schedule. This only affects the funded-but-unallocated balance.

Access: DEFAULT_ADMIN_ROLE

Emergency Withdraw

emergencyWithdraw(tokenAddress, amount, to)

Recovers mistakenly sent ERC20 tokens. If withdrawing WTD tokens, the function ensures allocated and funded tokens are not withdrawn.

Access: DEFAULT_ADMIN_ROLE

View Functions

Function
Description

getVestingInfo(beneficiary, round)

Full investor vesting details

getTeamVestingInfo(beneficiary, role)

Full team vesting details

getClaimable(beneficiary, round)

Claimable investor tokens

getClaimableTGEUnlock(beneficiary, round)

Claimable TGE unlock amount

getTeamClaimable(beneficiary, role)

Claimable team tokens

getUnallocated(round)

Unallocated tokens for a round

getUnallocatedTeamAdvisors()

Unallocated team/advisor tokens

fundedPerRound(round)

Total funded amount per round

allocatedPerRound(round)

Total allocated amount per round

tgeTimestamp()

TGE timestamp

vestingRoleLocked()

Whether VESTING_ROLE is locked